from langchain_core.messages import get_buffer_string, ToolMessage
from langchain_core.messages import HumanMessage, AIMessage

msgs = [
    HumanMessage(content="Hey"),
    AIMessage(content="Hi! How can I help?"),
    ToolMessage(content="OK"),
]

buffer_str = get_buffer_string(msgs)
print(buffer_str)
